#parseTree {
  display: flex;
  flex: 1;
}

#zoomOutButton {
  background-color: white;
  outline: none;
  border: 0;
  padding: 3px;
  margin: 5px 10px 0 10px;
  cursor: pointer;
  font-size: 18px;
  color: black;
  text-align: center;
  align-self: flex-start;
}
#zoomOutButton:hover {
  font-weight: bold;
}

#expandedInputWrapper {
  border-bottom: 1px solid #ddd;
  padding: 8px 0;
  position: relative;  /* For positioning #expandedInput. */
}

/*
  The sizer serves as a stand-in for the text that will be rendered in the canvas
  element; the style must be consistent with what is actually rendered.
 */
#expandedInputWrapper > #sizer {
  font-family: Menlo, Monaco, sans-serif;
  font-size: 100%;
}
#expandedInput {
  position: absolute;
  left: 0;
  top: 8px;
}

#parseResults {
  flex: 1;
  overflow: auto;
  padding: 2px;
}
.pexpr {
  color: #333;
  display: inline-block;
  flex-grow: 1;
  font-family: Menlo, Monaco, sans-serif;
  font-size: 9px;
  overflow: hidden;
  white-space: nowrap;
}
.pexpr.zoomBorder {
  border: 2px solid blue;
}
.pexpr.seq.failed {
  flex-grow: 0;
}
.pexpr.alt > .children > .pexpr {
  margin-left: 0;
}
.pexpr.failed > .self .label {
  background-color: transparent;
  box-sizing: border-box;
  color: #d44950;
  text-align: left;
}

.pexpr:not(.failed) > .self .label:hover {
  background-color: #ddd;
}
.pexpr:not(.collapsed) > .self .label:hover {
  border-bottom-color: #ddd;
}
.pexpr.failed > .self .label:hover {
  border-bottom: 1px solid #ccc;
}

.pexpr.leaf > .self .label,
.pexpr.leaf > .self .label:hover {
  border-bottom-color: transparent;
  cursor: default;
}

/* A successful expression in a failed branch */
.pexpr.failed .pexpr:not(.failed):not(.unevaluated) > .self .label {
  background-color: #FFD7DE;
}

/*
  Use disclosures to distinguish vertically-stacked siblings from parent/children relationships.
 */
.pexpr.disclosure {
  padding-left: 10px;
  position: relative;  /* For positioning the ::before element */
}
.pexpr.disclosure::before {
  color: #bbb;
  content: '\25BC';  /* Black Down-pointing triangle */
  font-size: 10px;
  left: 2px;
  position: absolute;
  top: 1px;
  width: 8px;
}
.pexpr.disclosure.collapsed::before {
  content: '\25B6';  /* Black Right-pointing triangle */
  left: 3px;
}

/*
  By default, give .self a transparent border to enforce spacing between nodes.
  It can also be used to put a border around a label without affecting the layout.
 */
.pexpr:not(.unlabeled) > .self {
  border: 1px solid transparent;
}
.pexpr.currentParseStep > .self {
  border: 1px solid rgb(53, 151, 255) !important;
}

.pexpr.undecided > .self .label {
  background-color: transparent;
  border-bottom: 1px solid #dfdfdf;
  box-sizing: border-box;
  color: #aaa;
  font-style: italic;
}
.pexpr > .self .label {
  background-color: #eaeaea;
  border-bottom: 1px solid #eaeaea;
  cursor: pointer;
  display: block;
  margin: 0;
  padding: 2px 2px 1px 2px;
  position: relative;
  text-align: center;
}
.pexpr > .self .label .caseName::before {
  content: '\2014';
  padding: 0 0.5em;
}
.pexpr > .self .label .caseName {
  font-style: italic;
  opacity: 0.7;
}

.pexpr.unevaluated > .self .label {
  background-color: transparent;
  color: #aaa;
}
.pexpr[hidden] {
  visibility: hidden;
}
.pexpr.unlabeled > .self .label {
  display: none;
}
.pexpr.collapsed > .self .label {
  border-bottom: 1px dashed #999;
}
.pexpr.failed.disclosure.collapsed > .self .label {
  border-bottom-color: transparent;  /* Prevent dashed border */
}
.pexpr > .children {
  display: flex;
  flex-direction: row;
}
.pexpr > .children[hidden] {
  display: none;
}
.pexpr .vbox {
  display: flex;
  flex-direction: column;
}

#visualizerBody {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}
